﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>修改学生信息</title>
    <link rel="stylesheet" href="../layui/css/layui.css" media="all">
    <script src="../Scripts/jquery-3.3.1.js"></script>
    <script src="../layui/layui.js" charset="utf-8"></script>
</head>

<body>

    <div class="layui-card">
        <div class="layui-card-header">忘记密码</div>
        <div class="layui-card-body" pad15="">

            <div class="layui-form" lay-filter="">
                <div class="layui-form-item">
                    <div class="layui-form-item"></div>
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="tel" autocomplete="off" placeholder="请输入账号" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">手机号码</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="password" autocomplete="off" placeholder="请输入密码" class="layui-input">
                    </div>
                    

                </div>
                <div class="layui-form-item">
                        
                    <label class="layui-form-label">验证码</label>
                    <div class="layui-input-inline">
                        <input type="text" name="tel" autocomplete="off" placeholder="请输入验证码" class="layui-input">
                    </div>
                    
                    <div class="layui-input-inline">
                        <input type="button" id="code"  autocomplete="off" value="获取验证码" class="layui-btn">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input type="password" name="password" autocomplete="off" placeholder="请输入密码" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" id="submitBtn" onclick="return false;">确认修改</button>
            </div>
        </div>
    </div>

    </div>
    </div>
    <script>
        layui.use(['form', 'layedit', 'layer', 'jquery'], function () {
            var form = layui.form,
                layedit = layui.layedit,
                layer = layui.layer,
                $ = layui.jquery;

            $("#code").click(function(){
                layer.alert("你能获取验证码，算我输");
            })
            $("input[name='password']").change(function () {
                var len = $(this).val().length;
                if (len < 6) {

                    layer.alert("账号长度过短", { icon: 4 });

                }
                var r = /^(([a-zA-Z]+[0-9]+)|([0-9]+[a-zA-Z]+)|([a-z]+[@#%])|([0-9]+[@#%]))([a-zA-Z0-9@#%]*)$/;
                if (!r.test($(this).val())) {
                    layer.alert("至少包含两种字符", { icon: 4 });
                    return;
                }
            });


            $("#submitBtn").click(function () {
                layer.alert('兄弟没有验证码！', { icon: 1 });
            });



        })
    </script>

</body>

</html>